import {NgModule} from "@angular/core";
import {RouterModule, Routes} from "@angular/router";
import {SharedModule} from "../../shared/shared.module";

import {MinerItemListComponent} from "./miner-item-list/miner-item-list.component";
import {MinerItemDetailComponent} from "./miner-item-detail/miner-item-detail.component";
import {MinerItemEditComponent} from "./miner-item-edit/miner-item-edit.component";

const routes: Routes = [
        {path: '', redirectTo: 'list'},
        {path: 'list', component: MinerItemListComponent},
        {path: 'add', component: MinerItemEditComponent},
        {path: 'modify/:code', component: MinerItemEditComponent},
        {path: 'detail/:code', component: MinerItemDetailComponent}
];

@NgModule({
  imports: [
    SharedModule.forRoot(),
    RouterModule.forChild(routes)
  ],
  declarations: [
    MinerItemListComponent,
    MinerItemDetailComponent,
    MinerItemEditComponent
  ],
  providers: []
})
export class MinerModule {
}
